<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title>2333</title>

</head>
<script type="text/javascript">
  /* charCodeAt
    【格式】字符串.charCodeAt(下标)
    返回值：返回字符串中对应下表字符的ASCII码值
    */

  var str = "hello";
  alert(str.charCodeAt(1));

  /*
  String.fromCharCode();
  【格式】String.fromCharCode(ASCII码值)
  参数：ASCII码值，个数任意
  返回值：ASCII码值对应的字符组成的字符串
  */
  var str2 = String.fromCharCode(97, 98, 99);
  alert(str2);
</script>

<body>

</body>

</html>